var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("GlobalParams"),
    a = e("EquipInfo"),
    i = cc._decorator,
    r = i.ccclass,
    s =
        (i.property,
        (function () {
            function e() {}
            return (
                (e.getPlayerInit = function () {
                    return {
                        attack: 0,
                        skill_1: 0,
                        skill_2: 0,
                        hp: 0,
                        move_speed: 0,
                        cool_1: 0,
                        cool_2: 0,
                        crit: 0,
                        attack_speed: 0,
                        be_hit: 0,
                        be_hit_back: 0,
                        add_attack: 0,
                        attack_hp: 0,
                        suck_blood: 0,
                        skill_add: 0,
                        for_speed: 0,
                        die_up_hp: 0
                    };
                }),
                (e.buyEquipInit = function () {
                    for (var e = 0; e < 6; e++) n.GlobalParams.BuyEquipInfo.push(this.getPlayerInit());
                }),
                (e.playerBuyEquipInfo = function (e, t) {
                    for (
                        var o = this.getPlayerInit(), i = n.GlobalParams.MatchGamePlayer[e].equip_info, r = 0;
                        r < i.length;
                        r++
                    )
                        if (0 != i[r]) {
                            for (var s = a.default.eqquip_info[i[r]], l = 0; l < s.eq_info.length; l++) {
                                var c = "" + s.eq_info[l].type,
                                    d = s.eq_info[l].num;
                                switch (c) {
                                    case "0":
                                        o.attack += d;
                                        break;
                                    case "1":
                                        o.hp += d;
                                        break;
                                    case "2":
                                        (o.cool_1 += d), (o.cool_2 += d);
                                        break;
                                    case "3":
                                        o.attack_speed += d;
                                        break;
                                    case "4":
                                        o.crit += d;
                                        break;
                                    case "5":
                                        o.move_speed += d;
                                }
                            }
                            switch ("" + i[r]) {
                                case "6":
                                    o.be_hit += 5;
                                    break;
                                case "7":
                                    o.be_hit_back += 5;
                                    break;
                                case "11":
                                    o.skill_add += 3;
                                    break;
                                case "12":
                                    o.skill_add += 1;
                                    break;
                                case "13":
                                    (o.add_attack += 3), (o.attack_hp += 2);
                                    break;
                                case "14":
                                    o.add_attack += 5;
                                    break;
                                case "16":
                                    o.suck_blood += 3;
                                    break;
                                case "17":
                                    o.die_up_hp += 100;
                                    break;
                                case "18":
                                    o.be_hit += 10;
                                    break;
                                case "19":
                                    (o.be_hit_back += 10), (o.skill_add += 5);
                                    break;
                                case "20":
                                case "21":
                                    o.move_speed += 2;
                                    break;
                                case "22":
                                    o.be_hit += 10;
                                    break;
                                case "23":
                                    (o.cool_1 += 0.3), (o.cool_2 += 0.3);
                                    break;
                                case "24":
                                    o.for_speed = 20;
                                    break;
                                case "25":
                                    (o.cool_1 += 1), (o.cool_2 += 1);
                                    break;
                                case "26":
                                    o.skill_add += 15;
                                    break;
                                case "27":
                                    (o.add_attack += 5), (o.attack_hp += 3);
                                    break;
                                case "28":
                                    o.add_attack += 15;
                                    break;
                                case "30":
                                    o.suck_blood += 3;
                                    break;
                                case "31":
                                    o.die_up_hp += 100;
                                    break;
                                case "32":
                                    o.be_hit += 15;
                                    break;
                                case "33":
                                    (o.be_hit_back += 20), (o.skill_add += 5);
                                    break;
                                case "34":
                                    o.move_speed += 2;
                                    break;
                                case "35":
                                    o.for_speed += 35;
                                    break;
                                case "36":
                                    (o.cool_1 += 1.5), (o.cool_2 += 1.5);
                                    break;
                                case "37":
                                    o.skill_add += 25;
                            }
                        }
                    (n.GlobalParams.BuyEquipInfo[e] = o), t();
                }),
                __decorate([r], e)
            );
        })());
o.default = s;
